Conditional Verification Logic ^^^^^ **Definition:** * This is usually caused by wanting to prevent the execution of assertions if the SUT fails to return the right objects or the use of loops to verify the contents of collections returned by the SUT. **Code Example:** .. code-block:: java public void testCombinationsOfInputValues() { Calculator sut = new Calculator(); int expected; for (int i = 0; i < 10; i++){ for(int j = 0 ; j < 10; j++){ int acutal = sut.calculate(i , j); if(i==3 & j==4){ expected = 8; } else { expected = i+j; } assertEquals(message(i, j), expected, actual); } } } private String message(int i, int j) { return "Cell (" + String.valueOf(i) + ", " + String.valueOf(j) + ")"; } **References:** .. admonition:: Quality attributes * :octicon:`file-code;1em` - Code Example * :octicon:`comment-discussion;1em` - Cause and Effect * :octicon:`graph;1em` - Frequency * :octicon:`sync;1em` - Refactoring * `xUnit test patterns: Refactoring test code `_ :octicon:`file-code;1em` :octicon:`comment-discussion;1em` :octicon:`sync;1em`